home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Trial
/
Camtasia 6
/
camtasia.msi
/
Cabs.w1.cab
/
getVidInfo.swf
/
scripts
/
frame_1
/
DoAction.as
Wrap
Text File
|
2008-10-09
|
935b
|
35 lines
function getVidInfo(filename)
{
var _loc1_ = {};
_loc1_.nc = new NetConnection();
_loc1_.nc.connect(null);
_loc1_.ns = new NetStream(_loc1_.nc);
_loc1_.filename = filename;
_loc1_.ns.onMetaData = mx.utils.Delegate.create(_loc1_,onMeta);
_loc1_.ns.onStatus = mx.utils.Delegate.create(_loc1_,onStatus);
_loc1_.ns.play(filename);
return filename;
}
function copyObj(rhs)
{
var _loc2_ = {};
for(var _loc3_ in rhs)
{
_loc2_[_loc3_] = typeof rhs[_loc3_] != "object" ? rhs[_loc3_] : "??";
}
return _loc2_;
}
function onMeta(meta)
{
flash.external.ExternalInterface.call("onVidInfo",this.filename,copyObj(meta));
this.ns.close();
}
function onStatus(info)
{
if(info.level == "error")
{
flash.external.ExternalInterface.call("onVidInfo",this.filename,"error");
}
}
flash.external.ExternalInterface.addCallback("getVidInfo",null,getVidInfo);